#!/usr/bin/python3
# -*- coding:utf-8 -*-
"""
@time: 2021/8/24 10:57
@desc: 
"""
from Face_Num.My_Count import Face_Num
from Word_OCR.MY_OCR import My_OCR
from animal_classify import animal_classify


def main(file_path):
    results = Face_Num(file_path)
    data = My_OCR(file_path)
    kind = animal_classify(file_path)
    name = str(len(results[0]['data']))
    for infomation in data:
        name += "_" + infomation['text']
    file_name = name + ".jpeg"
    for str1 in kind:
        if '犬' in kind or '狗' in str1:
            return file_name, '狗'
        elif '猫' in str1:
            return file_name, '猫'
        elif '兔' in str1:
            return file_name, '兔'
        elif '龟' in str1:
            return file_name, '龟'
        elif '鱼' in str1:
            return file_name, '鱼'
        elif '鸟' in str1:
            return file_name, '鸟'
        else:
            return file_name, None
